package com.hengda.museumonline.utils;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * @author：JFWU on 2016/9/23 16:52
 * @E-mail：jeffy12138@126.com
 */
public class SharedPreferenceUtil {
    private SharedPreferences sp;
    private SharedPreferences.Editor editor;

    public SharedPreferenceUtil(Context context, String file) {
        sp = context.getSharedPreferences(file, Context.MODE_PRIVATE);
        editor = sp.edit();
    }

    public void setTheme(String Theme) {
        editor.putString("Theme", Theme);
        editor.commit();
    }

    public String getTheme() {
        return sp.getString("Theme", "DayTheme");
    }

    public void setToken(String token) {
        editor.putString("token", token);
        editor.commit();
    }

    public String getToken() {
        return sp.getString("token", "");
    }



}
